class LoginController {
    async register(ctx, next) {
        const { user_name, password } = ctx.request.body
        ctx.body = {
            message: '用户注册成功',
            code: 0,
        };
    }

    async login(ctx, next) {
        const { user_name, password } = ctx.request.body;
        if (user_name === "bigTree" && password === "123456") {
            ctx.body = {
                message: "登录成功",
                code: 200,
            };
        } else {
            ctx.body = {
                message: "登录失败，账号或者密码错误",
                code: -1,
            };
        }
    }
}

module.exports = new LoginController()